package com.starmark.gateway.pt.provider.mapper;

import com.starmark.core.framework.base.SuperMapper;
import com.starmark.gateway.pt.provider.entity.PtInterfaceRequestField;
import org.apache.ibatis.annotations.*;

import java.util.List;

/**
 * <p>
 * Mapper 接口
 * </p>
 *
 * @author starmark
 * @since 2020-05-25
 */
@Mapper
public interface PtInterfaceRequestFieldMapper extends SuperMapper<PtInterfaceRequestField> {

    /**
     * 删除接口下的字段
     *
     * @param interfaceId 接口ID
     */

    @Delete("delete from pt_interface_request_field where interface_id=#{interfaceId} ")
    void deleteItemsByInterfaceId(@Param("interfaceId") String interfaceId);

    /**
     * 接口下的字段
     *
     * @param interfaceId 接口ID
     * @return 字段
     */
    @Select("select * from pt_interface_request_field where interface_id=#{interfaceId}  ")
    @ResultMap("BaseResultMap")
    List<PtInterfaceRequestField> getInterfaceFieldList(@Param("interfaceId") String interfaceId);

}